import http from "../../utils/http";
// 公共接口
const publicFun = {
   // 上传图片
   upload: (data) =>
      http.post("/api/upload", data, null, {
         customStatus: "pub",
      }),

   // 获取产品列表损耗单位
   getMeasureUnitList: (data) =>
      http.get("/api/measure_unit_select_list", data, {
         customStatus: "pub",
      }),

   // 获取供应商等级列表
   getSupplierLevelList: (data) =>
      http.get("/api/supplier_level_select_list", data, {
         customStatus: "pub",
      }),

   // 产品下拉列表
   getProductList: (data) =>
      http.get("/api/product_select_list", data, {
         customStatus: "pub",
      }),

   // 下拉分组列表
   getProductGroupList: (data) =>
      http.get("/api/product_group_select_list", data, {
         customStatus: "pub",
      }),

   // 获取供应商列表
   getSupplierList: (data) =>
      http.get("/api/supplier_select_list", data, {
         customStatus: "pub",
      }),

   // 获取管家站列表
   getShopList: (data) =>
      http.get("/api/shop_select_list", data, {
         customStatus: "pub",
      }),
   // 获取客户等级列表
   getLevelList: (data) =>
      http.get("/api/customer_level_select_list", data, {
         customStatus: "pub",
      }),
   // 获取负责人（组织人员）列表
   getPurchasingDirectorList: (data) =>
      http.get("/api/org_member_select_list", data, {
         customStatus: "pub",
      }),
   // 获取组织架构树形结构
   getOrgList: (data) =>
      http.get("/api/org_tree_list", data, {
         customStatus: "pub",
      }),
   // 获取客户下拉列表
   getCustomerList: (data) =>
      http.get("/api/customer_select_list", data, {
         customStatus: "pub",
      }),

   //获取仓库列表
   getWarehouseList: (data) =>
      http.get("/api/warehouse_select_list", data, {
         customStatus: "pub",
      }),

   //规格单位数量的转换
   getUnitConversion: (data) =>
      http.get("/api/unit_convert", data, {
         customStatus: "pub",
      }),
   // 获取产品spu下拉列表
   getProductSpuList: (data) =>
      http.get("/api/product_spu_select_list", data, {
         customStatus: "pub",
      }),
   // 获取补货规则配置
   getReplenishmentRules: (data) =>
      http.get("/api/get_restock_config", data, {
         customStatus: "pub",
      }),

   // 获取城市列表
   getCityList: (data) =>
      http.get("/api/get_city_code_list", data, {
         customStatus: "pub",
      }),

   // 车管家服务列表（服务下拉列表）
   service_item_list: (data) =>
      http.get("/api/warehouse/service_item_list", data, {
         customStatus: "pub",
      }),

   // 获取补库单下拉列表
   getOutboundList: (data) =>
      http.get("/api/outbound_order_select_list", data, {
         customStatus: "pub",
      }),
};

export default publicFun;
